<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <script>
    var gaProperty = 'UA-2577926-1';
    // Disable tracking if the opt-out cookie exists.
    var disableStr = 'ga-disable-' + gaProperty;
    if (document.cookie.indexOf(disableStr + '=true') > -1) {
      window[disableStr] = true;
    }
    function gaOptout() {
      document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
      window[disableStr] = true;
    }
    function gaOptoutRevoke() {
      document.cookie = disableStr + '=false; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
      window[disableStr] = false;
    }
    </script>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-2577926-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-2577926-1', { 'anonymize_ip': true });
    </script>
    <link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
    <script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
    <script>
    window.addEventListener("load", function() {
      window.cookieconsent.initialise({
        'palette': {
          'popup': {
            'background': '#eaf7f7',
            'text': '#5c7291'
          },
          'button': {
            'background': '#56cbdb',
            'text': '#ffffff'
          }
        },
        'theme': 'edgeless',
        'type': 'opt-out',
        'onInitialise': function (status) {
          if (!this.hasConsented()) {
            gaOptout()
          }
        },
        'onStatusChange': function(status, chosenBefore) {
          if (!this.hasConsented()) {
            gaOptout()
          }
        },
        'onRevokeChoice': function() {
          gaOptoutRevoke()
        }
      })
    });
    </script>
    <title>OpenLayers v6.13.0 API - Module: ol/proj</title>
    <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch"></script>
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="scripts/jquery.min.js"></script>
    <script src="scripts/bootstrap.bundle.min.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
    <link type="text/css" rel="stylesheet" href="styles/site.css">
  </head>
  <body>
    <div class="container-fluid">
      <header class="navbar navbar-expand-sm navbar-dark mb-3 py-0 fixed-top" role="navigation">
        <a class="navbar-brand" href="https://openlayers.org/"><img src="logo-70x70.png" alt="">&nbsp;OpenLayers</a>

        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#olmenu" aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>

        <!-- menu items that get hidden below 768px width -->
        <nav class="collapse navbar-collapse" id="olmenu">
          <ul class="navbar-nav ml-auto">
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="docdropdown">
              <a class="dropdown-item" href="/en/latest/doc/">Docs</a>
              <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="../doc/quickstart.html"><i class="fa fa-check fa-fw mr-2 fa-lg"></i>Quick Start</a>
                <a class="dropdown-item" href="../doc/faq.html"><i class="fa fa-question fa-fw mr-2 fa-lg"></i>FAQ</a>
                <a class="dropdown-item" href="../doc/tutorials/"><i class="fa fa-book fa-fw mr-2 fa-lg"></i>Tutorials</a>
                <a class="dropdown-item" href="/workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fa fa-stack-overflow fa-fw mr-2"></i>Ask a Question</a>
            </div>
          </li>
          <li class="nav-item"><a class="nav-link" href="../examples/">Examples</a></li>
          <li class="nav-item active"><a class="nav-link" href="../apidoc/"><i class="fa fa-sitemap mr-1"></i>API</a></li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="codedropdown">
              <a class="dropdown-item" href="https://github.com/openlayers/openlayers"><i class="fa fa-github fa-fw mr-2 fa-lg"></i>Repository</a>
              <a class="dropdown-item" href="/download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
            </div>
           </li>
          </ul>
        </nav>
      </header>
      <div id="wrap" class="row">
        <div class="navigation col-md-4 col-lg-3">
          <div class="search-wrapper">
            <div class="search">
              <input id="search" type="text" autocomplete="off" class="form-control input-sm" placeholder="Search Documentation">
            </div>
          </div>
          <div class="navigation-list-wrapper">
            <ul class="navigation-list search-empty">
<li class="item item-module toggle-manual toggle-manual-show" data-longname="module:ol/proj" data-name="ol/proj">
    <span class="title toggle">
        <span class="fa fa-plus mr-2 mt-1"></span>
        <span><a href="module-ol_proj.html">ol​/proj</a></span>
    </span>
    <div class="member-list" data-type="typedefs">
        <span class="subtitle">Typedefs</span>
        <ul>
            <li data-name="projectionlike"><a href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a>
            <li data-name="transformfunction"><a href="module-ol_proj.html#~TransformFunction">TransformFunction</a>
        </ul>
    </div>
    <div class="member-list" data-type="methods">
        <span class="subtitle">Methods</span>
        <ul>
            <li data-name="addcoordinatetransforms"><a href="module-ol_proj.html#.addCoordinateTransforms">addCoordinateTransforms</a>
            <li data-name="addequivalentprojections"><a href="module-ol_proj.html#.addEquivalentProjections">addEquivalentProjections</a>
            <li data-name="addprojection"><a href="module-ol_proj.html#.addProjection">addProjection</a>
            <li data-name="clearuserprojection"><a href="module-ol_proj.html#.clearUserProjection">clearUserProjection</a>
            <li data-name="equivalent"><a href="module-ol_proj.html#.equivalent">equivalent</a>
            <li data-name="fromlonlat"><a href="module-ol_proj.html#.fromLonLat">fromLonLat</a>
            <li data-name="get"><a href="module-ol_proj.html#.get">get</a>
            <li data-name="getpointresolution"><a href="module-ol_proj.html#.getPointResolution">getPointResolution</a>
            <li data-name="gettransform"><a href="module-ol_proj.html#.getTransform">getTransform</a>
            <li data-name="getuserprojection"><a href="module-ol_proj.html#.getUserProjection">getUserProjection</a>
            <li data-name="setuserprojection"><a href="module-ol_proj.html#.setUserProjection">setUserProjection</a>
            <li data-name="tolonlat"><a href="module-ol_proj.html#.toLonLat">toLonLat</a>
            <li data-name="transform"><a href="module-ol_proj.html#.transform">transform</a>
            <li data-name="transformextent"><a href="module-ol_proj.html#.transformExtent">transformExtent</a>
            <li data-name="usegeographic"><a href="module-ol_proj.html#.useGeographic">useGeographic</a>
        </ul>
    </div>
              <li class="loading">Loading …
            </ul>
          </div>
        </div>

        <div class="main col-md-8 col-lg-9">
            <h1 class="page-title" data-filename="module-ol_proj.html">Module: ol/proj</h1>
            <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
              <button id="latest-dismiss" type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
              This documentation is for OpenLayers v<span id="package-version">6.13.0</span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
            </div>
            



<section class="content">

<header>
    <h2 class="my-3">ol/proj
    </h2>
    <br>
    
      
      
        <pre class="prettyprint source"><code>import * as olProj from 'ol/proj';</code></pre>
      
    
    <div class="row p-3 ">
      <div id="ad" class="col-lg-5 order-2 align-self-center border rounded bg-light ">
        <script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg" id="_carbonads_js"></script>
      </div>
    
    </div>
</header>

<article>
    <div class="container-overview">
    

    
        

        
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


        
    
    </div>

    

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".addCoordinateTransforms">
        </div>
        <h4 class="name">
            module:ol/proj.addCoordinateTransforms<span class="signature">(source, destination, forward, inverse)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L374">line 374</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {addCoordinateTransforms} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Registers coordinate transform functions to convert coordinates between the
source projection and the destination projection.
The forward and inverse functions convert coordinate pairs; this function
converts these into the functions used internally which also handle
extents and coordinate arrays.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>source</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Source projection.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>destination</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Destination projection.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>forward</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The forward transform
    function (that is, from the source projection to the destination
    projection) that takes a <a href="module-ol_coordinate.html#~Coordinate"><code>module:ol/coordinate~Coordinate</code></a> as argument and returns
    the transformed <a href="module-ol_coordinate.html#~Coordinate"><code>module:ol/coordinate~Coordinate</code></a>.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>inverse</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The inverse transform
    function (that is, from the destination projection to the source
    projection) that takes a <a href="module-ol_coordinate.html#~Coordinate"><code>module:ol/coordinate~Coordinate</code></a> as argument and returns
    the transformed <a href="module-ol_coordinate.html#~Coordinate"><code>module:ol/coordinate~Coordinate</code></a>.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".addEquivalentProjections">
        </div>
        <h4 class="name">
            module:ol/proj.addEquivalentProjections<span class="signature">(projections)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L262">line 262</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {addEquivalentProjections} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Registers transformation functions that don't alter coordinates. Those allow
to transform between projections with equal meaning.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>projections</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="module-ol_proj_Projection-Projection.html">module:ol/proj/Projection~Projection</a>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Projections.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".addProjection">
        </div>
        <h4 class="name">
            module:ol/proj.addProjection<span class="signature">(projection)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L153">line 153</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {addProjection} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Add a Projection object to the list of supported projections that can be
looked up by their code.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>projection</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj_Projection-Projection.html">module:ol/proj/Projection~Projection</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Projection instance.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".clearUserProjection">
        </div>
        <h4 class="name">
            module:ol/proj.clearUserProjection<span class="signature">()</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L565">line 565</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {clearUserProjection} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Clear the user projection if set.</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".equivalent">
        </div>
        <h4 class="name">
            module:ol/proj.equivalent<span class="signature">(projection1, projection2)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{boolean}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L439">line 439</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {equivalent} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Checks if two projections are the same, that is every coordinate in one
projection does represent the same geographic point as the same coordinate in
the other projection.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>projection1</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj_Projection-Projection.html">module:ol/proj/Projection~Projection</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Projection 1.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>projection2</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj_Projection-Projection.html">module:ol/proj/Projection~Projection</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Projection 2.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Equivalent.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".fromLonLat">
        </div>
        <h4 class="name">
            module:ol/proj.fromLonLat<span class="signature">(coordinate, <span class="optional">opt_projection</span>)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L398">line 398</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {fromLonLat} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Transforms a coordinate from longitude/latitude to a different projection.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>coordinate</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Coordinate as longitude and latitude, i.e.
    an array with longitude as 1st and latitude as 2nd element.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>projection</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Target projection. The
    default is Web Mercator, i.e. 'EPSG:3857'.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Coordinate projected to the target projection.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".get">
        </div>
        <h4 class="name">
            module:ol/proj.get<span class="signature">(projectionLike)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_proj_Projection-Projection.html">module:ol/proj/Projection~Projection</a>|null}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L174">line 174</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {get} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Fetches a Projection object for the code specified.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>projectionLike</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Either a code string which is
    a combination of authority and identifier such as &quot;EPSG:4326&quot;, or an
    existing projection object, or undefined.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Projection object, or null if not in list.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".getPointResolution">
        </div>
        <h4 class="name">
            module:ol/proj.getPointResolution<span class="signature">(projection, resolution, point, <span class="optional">opt_units</span>)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{number}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L200">line 200</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {getPointResolution} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Get the resolution of the point in degrees or distance units.
For projections with degrees as the unit this will simply return the
provided resolution. For other projections the point resolution is
by default estimated by transforming the <code>point</code> pixel to EPSG:4326,
measuring its width and height on the normal sphere,
and taking the average of the width and height.
A custom function can be provided for a specific projection, either
by setting the <code>getPointResolution</code> option in the
<a href="module-ol_proj_Projection-Projection.html"><code>module:ol/proj/Projection~Projection</code></a> constructor or by using
<a href="module-ol_proj_Projection-Projection.html#setGetPointResolution"><code>module:ol/proj/Projection~Projection#setGetPointResolution</code></a> to change an existing
projection object.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>projection</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The projection.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>resolution</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Nominal resolution in projection units.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>point</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Point to find adjusted resolution at.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>units</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj_Units.html">module:ol/proj/Units</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Units to get the point resolution in.
Default is the projection's units.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Point resolution.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".getTransform">
        </div>
        <h4 class="name">
            module:ol/proj.getTransform<span class="signature">(source, destination)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_proj.html#~TransformFunction">module:ol/proj~TransformFunction</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L484">line 484</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {getTransform} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Given the projection-like objects, searches for a transformation
function to convert a coordinates array from the source projection to the
destination projection.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>source</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Source.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>destination</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Destination.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Transform function.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".getUserProjection">
        </div>
        <h4 class="name">
            module:ol/proj.getUserProjection<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_proj_Projection-Projection.html">module:ol/proj/Projection~Projection</a>|null}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L576">line 576</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {getUserProjection} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Get the projection for coordinates supplied from and returned by API methods.
Note that this method is not yet a part of the stable API.  Support for user
projections is not yet complete and should be considered experimental.</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
The user projection (or null if not set).
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".setUserProjection">
        </div>
        <h4 class="name">
            module:ol/proj.setUserProjection<span class="signature">(projection)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L557">line 557</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {setUserProjection} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Set the projection for coordinates supplied from and returned by API methods.
This includes all API methods except for those interacting with tile grids.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>projection</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The user projection.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".toLonLat">
        </div>
        <h4 class="name">
            module:ol/proj.toLonLat<span class="signature">(coordinate, <span class="optional">opt_projection</span>)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L416">line 416</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {toLonLat} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Transforms a coordinate to longitude/latitude.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>coordinate</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Projected coordinate.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>projection</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Projection of the coordinate.
    The default is Web Mercator, i.e. 'EPSG:3857'.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Coordinate as longitude and latitude, i.e. an array
    with longitude as 1st and latitude as 2nd element.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".transform">
        </div>
        <h4 class="name">
            module:ol/proj.transform<span class="signature">(coordinate, source, destination)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L504">line 504</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {transform} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Transforms a coordinate from source projection to destination projection.
This returns a new coordinate (and does not modify the original).</p>
<p>See <a href="module-ol_proj.html#.transformExtent"><code>module:ol/proj.transformExtent</code></a> for extent transformation.
See the transform method of <a href="module-ol_geom_Geometry-Geometry.html"><code>module:ol/geom/Geometry~Geometry</code></a> and its
subclasses for geometry transforms.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>coordinate</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Coordinate.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>source</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Source projection-like.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>destination</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Destination projection-like.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Coordinate.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".transformExtent">
        </div>
        <h4 class="name">
            module:ol/proj.transformExtent<span class="signature">(extent, source, destination, <span class="optional">opt_stops</span>)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L521">line 521</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {transformExtent} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Transforms an extent from source projection to destination projection.  This
returns a new extent (and does not modify the original).</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>extent</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The extent to transform.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>source</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Source projection-like.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>destination</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_proj.html#~ProjectionLike">module:ol/proj~ProjectionLike</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Destination projection-like.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>stops</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Number of stops per side used for the transform.
By default only the corners are used.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
The transformed extent.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id=".useGeographic">
        </div>
        <h4 class="name">
            module:ol/proj.useGeographic<span class="signature">()</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L585">line 585</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">


  <pre class="prettyprint source"><code>import {useGeographic} from 'ol/proj';</code></pre>


    
    <div class="description">
        <p>Use geographic coordinates (WGS-84 datum) in API methods.  This includes all API
methods except for those interacting with tile grids.</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        </dl>
    

    
        <h3 class="subsection-title">Type Definitions</h3>

        <dl>
                
<dt class="">
    <div class="nameContainer">
        <div class="anchor" id="~ProjectionLike">
        </div>
        <h4 class="name">
            ProjectionLike<span class="type-signature type module:ol/proj/projection~projection">{<a href="module-ol_proj_Projection-Projection.html">module:ol/proj/Projection~Projection</a>}</span> <span class="type-signature type string">{string}</span> <span class="type-signature type undefined">{undefined}</span> 
            

        </h4>
    </div>
    
</dt>
<dd class="">
    
    <div class="description">
        <p>A projection as <a href="module-ol_proj_Projection-Projection.html"><code>module:ol/proj/Projection~Projection</code></a>, SRS identifier
string or undefined.</p>
    </div>
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    
</dd>

            
                
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="~TransformFunction">
        </div>
        <h4 class="name">
            TransformFunction<span class="signature">()</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js">proj.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/proj.js#L86">line 86</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>A transform function accepts an array of input coordinate values, an optional
output array, and an optional dimension (default should be 2).  The function
transforms the input coordinate values, populates the output array, and
returns the output array.</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

            </dl>
    

    
</article>

</section>




        </div>
      </div>
      <script>prettyPrint();</script>
      <script src="scripts/linenumber.js"></script>
      <script src="scripts/main.js"></script>
    </div>
  </body>
</html>